<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
  <link rel="stylesheet" href="./lib/bootstrap/css/bootstrap.min.css" />
  <link rel="stylesheet" href="./lib/nprogress/nprogress.css">
  <link rel="stylesheet" href="./css/common.css" />
</head>

<body class="pl-180">
  <div class="aside bg-color">

    <div class="user">
      <h1>乐淘商城</h1>
      <img src="./images/default.png" alt="">
      <h3>超级管理员</h3>
    </div>
    <ul class="manage">
      <li class="menu-active"><a href="user.html"><span class="glyphicon glyphicon-user"></span>用户管理</a></li>
      <li class="category">
        <a href="#"><span class="glyphicon glyphicon-user"></span>分类管理</a>
        <ul class="two menu-hide">
          <li><a href="one.html">一级菜单</a></li>
          <li><a href="two.html">二级菜单</a></li>
        </ul>
      </li>
      <li><a href="product.html"><span class="glyphicon glyphicon-user"></span>商品管理</a></li>
    </ul>
  </div>
  <div class="main">
    <div class="top pl-180">
      <i class="glyphicon glyphicon-th-list pull-left icon-m8 icon-f30 i-toggle"></i>
      <i class="glyphicon glyphicon-th-list pull-right icon-m8 icon-f30 i-return" data-toggle="modal" data-target="#exit-modal"></i>
    </div>
    <div class="content mt50 p10">
      <ol class="breadcrumb">
        <li class="home"><a href="#">后台管理</a></li>
        <li class="active">用户中心</li>
      </ol>
      <!-- 表格区域 -->
      <table class="table table-hover table-striped table-bordered text-center">
        <thead>
          <tr>
            <th>序号</th>
            <th>用户名</th>
            <th>手机号</th>
            <th>状态</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>序号</td>
            <td>用户名</td>
            <td>手机号</td>
            <td>状态</td>
            <td>操作</td>
          </tr>
          <tr>
            <td>序号</td>
            <td>用户名</td>
            <td>手机号</td>
            <td>状态</td>
            <td>操作</td>
          </tr>
          <tr>
            <td>序号</td>
            <td>用户名</td>
            <td>手机号</td>
            <td>状态</td>
            <td>操作</td>
          </tr>
        </tbody>
      </table>
      <!-- 分页区域 -->
      <ul id="paginator" class="pagination pagination-lg"></ul>
    </div>
  </div>
  <!-- 禁用启用模态框 -->
  <div class="modal fade model-open" id="myModal" tabindex="-1">
    <div class="modal-dialog modal-sm">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
              aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="myModalLabel">温馨提示</h4>
        </div>
        <div class="modal-body">
          <p style="margin-bottom: 0;" class="text-warning"><i class="glyphicon glyphicon-info-sign"></i> 确定要执行该操作吗？</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
          <button type="button" class="btn btn-primary btn-ok">确定</button>
        </div>
      </div>
    </div>
  </div>
  <!-- 退出模态框 -->
  <div class="modal fade model-open" id="exit-modal" tabindex="-1">
    <div class="modal-dialog modal-sm">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
              aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="myModalLabel">温馨提示</h4>
        </div>
        <div class="modal-body">
          <p style="margin-bottom: 0;" class="text-warning"><i class="glyphicon glyphicon-info-sign"></i> 确定要退出吗？</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
          <button type="button" class="btn btn-primary btn-exit">确定</button>
        </div>
      </div>
    </div>
  </div>
  <!-- 渲染表格数据 -->
  <script type="text/html" id="tmp">
    {{each rows v i}}
       <tr>
        <td>{{ i+1+(page-1)*size}}</td>
        <td>{{v.username}}</td>
        <td>{{v.mobile}}</td>
        <td>{{v.isDelete==1?"已启用":"已禁用"}}</td>
        <td data-id={{v.id}}>
          {{if v.isDelete==1}}
          <button class="btn btn-danger btn-modal" data-toggle="modal" data-target="#myModal">禁用</button>
          {{else}}
          <button class="btn btn-success btn-modal" data-toggle="modal" data-target="#myModal">启用</button>
          {{/if}}
        </td>
      </tr>
    {{/each}}
  </script>

  <script src="./lib/jquery/jquery.min.js"></script>
  <script src="./lib/bootstrap/js/bootstrap.min.js"></script>
  <script src="./lib/bootstrap-validator/js/bootstrapValidator.min.js"></script>
  <script src="./lib/nprogress/nprogress.js"></script>
  <script src="./lib/artTemplate/template-web.js"></script>
  <script src="./lib/bootstrap-paginator/bootstrap-paginator.min.js"></script>
  <script src="./js/common.js"></script>
  <script src="./js/user.js"></script>
</body>

</html>